From 7471d395d98ba2e149072f74110303db72f2a7db Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Wed, 23 Aug 2017 19:34:00 +0200 Subject: [PATCH] xen/common/memory.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/common/memory.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Acked-by: Wei Liu Acked-by: Jan Beulich --- xen/common/memory.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index b2066db07e..26da6050f6 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -55,7 +55,8 @@ static unsigned int __read_mostly hwdom_max_order = CONFIG_HWDOM_MAX_ORDER; #ifdef HAS_PASSTHROUGH static unsigned int __read_mostly ptdom_max_order = CONFIG_PTDOM_MAX_ORDER; #endif -static void __init parse_max_order(const char *s) + +static int __init parse_max_order(const char *s) { if ( *s != ',' ) domu_max_order = simple_strtoul(s, &s, 0); @@ -67,6 +68,8 @@ static void __init parse_max_order(const char *s) if ( *s == ',' && *++s != ',' ) ptdom_max_order = simple_strtoul(s, &s, 0); #endif + + return *s ? -EINVAL : 0; } custom_param("memop-max-order", parse_max_order); -- 2.30.2